#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==================================================
# @File    : models
# @IDE     : PyCharm
# @Author  : liuxiangui
# @Date    : 2023/11/26 00:42
# @Describe: 
# ==================================================

from dataclasses import dataclass
from typing import Text, Union, Dict, List, Tuple, Any
from pydantic import BaseModel


@dataclass
class ModelTestCase:
    level: str
    feature: str
    story: str
    title: str
    actions: dict


@dataclass
class ModelAPICase:
    """测试用例model"""
    step: str
    describe: str
    method: str
    host: str
    url: str
    headers: dict
    data: Union[dict, str]
    is_json: bool
    files: str
    proxies: dict
    assertion: list
    sava_data_key_value: dict

@dataclass
class ModelSqlQuery:
    step: str
    sql_query: str
    assertion: list
    sava_data_key_value: dict

@dataclass
class ModelAssert:
    check_value: str
    assert_type: str
    expect_value: str


class ModelAssertDataType:
    jsonpath = "jsonpath="
    sql = "sql="
    cache = "cache="
